home *** CD-ROM | disk | FTP | other *** search
- Path: ctp.com!news
- From: Eddy Wong <ewong@ctp.com>
- Newsgroups: comp.lang.c++,ctp.lang.c++
- Subject: Re: Class definitions for C++ exceptions hierarchy?
- Date: Wed, 17 Apr 1996 13:40:21 +0200
- Organization: Cambridge Technology Partners
- Message-ID: <3174D8A5.7CCD@ctp.com>
- References: <4l16vd$jbo@concorde.ctp.com>
- NNTP-Posting-Host: 149.44.27.81
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01Gold (WinNT; I)
-
- Hi Ben,
-
- In the Philips project we're using a hierarchy of exceptions
- based on severity rather than type of error:
-
- Exception
- FatalException
- SeriousException
- WarningException
-
- Errors of the same severity are handled in a similar fashion.
- FatalExceptions pops up an error and quits, SeriousException causes
- the process to pop up an error information dialogue box and to ask for
- "ignore" or "abort" and WarningException causes the system to write some
- information in a log file. We might end up deriving new classes
- from these base classes.
-
- Please post or email your results, I'm interested in what you
- come up with.
-
-
- Eddy.
-
- Benjamin Lurie wrote:
- >
- > In Scott Meyers' book "More Effective C++ -- 35 New Ways to
- > Improve Your Programs and Designs" he talks about the
- > "diagnostics portion of the hierarchy of exceptions defined
- > by the standard C++ library". This hierarchy looks something
- > like the following:
- >
- > exception
- > logic_error
- > domain_error
- > invalid_argument
- > length_error
- > out_of_range
- > runtime_error
- > range_error
- > overflow_error
- >
- > I was wondering if someone had (or could point me to) the definition
- > for these exception classes. I assume that they all derive from
- > the xmsg class (or maybe that is a bad assumption)?
- >
- > I am thinking of emulating or creating these classes myself and
- > using the hierarchy in our project. Any comments on this idea?
- >
- > Thanks,
- > Ben
- >
- > ----------------------------------------------------------------------------
- > CAMBRIDGE Benjamin Lurie Tel: (617) 374-8374
- > TECHNOLOGY Senior Software Developer
- > PARTNERS Operations
- > ----------------------------------------------------------------------------
-
- --
- /\/\ | Eddy Wong ewong@ctp.com |
- / /_.\| Cambridge Technology Partners, Inc. (617) 374-9800 |
- \ /./| 304 Vassar St, Cambridge, MA 02139 (617) 374-8300 (fax) |
- \/\/ | USA |
-
-
- Currently at:
-
- Philips Dictation Systems GmbH Tel.: +43 1 60101 1685
- Attn.: CTP - Eddy Wong Fax: +43 1 60101 1817
- Computerstrasse 6
- A-1101, Vienna, Austria
-